<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>有效时间的数目</title>
</head>
<body>
  <script>
    function fn(time) {
      let i = 1, r = 1
      if (time[0] === '?') i = time[1] === '?' ? 24 : +time[1] < 4 ? 3 : 2
      else if (time[1] === '?') i = +time[0] < 2 ? 10 : 4
      if (time[3] === '?') r = time[4] === '?' ? 60 : 6
      else if (time[4] === '?') r = 10
      return i * r
    }
    console.log(fn('?5:00'))
  </script>
</body>
</html>